vcMatrix
A 4x4 matrix which is generally used to perform linear transformations and contains the position and orientation of objects.
See in: Overview
Module: vcCore
Parent: -
Children -
Referenced by: vcAnnotation.Location, vcAnnotation.Position, vcAssemblyPatternSlot.Position, vcAssemblyStep.AbsoluteFrame, ... (see more)
vcAnnotation.Location
vcAnnotation.Position
vcAssemblyPatternSlot.Position
vcAssemblyStep.AbsoluteFrame
vcAssemblyStep.RelativeFrame
vcBaseFrame.PositionMatrix
vcBeginWorkData.ResourcePositionMatrix
vcBeginWorkData.WorkPositionMatrix
vcBufferProductsStatement.Offset
vcCamera.Matrix
vcComponent.MovementOrigin
vcContainer.getPathPosition()
vcDimension.Location
vcDimension.Position1
vcDimension.Position2
vcFeature.NodePositionMatrix
vcFeature.PositionMatrix
vcFrameFeature.FramePositionMatrix
vcFrameFeature.OriginalFramePositionMatrix
vcFrameKinematicData.Position
vcFrameSet.getFrame()
vcFrameTarget.PositionMatrix
vcKinSolver.BaseMatrix
vcKinSolver.RootMatrix
vcKinSolver.ToolMatrix
vcKinematicFrame.PositionMatrix
vcKinematicFrame.WorldPositionMatrix
vcLinearTarget.Target
vcLinkJoint.PositionMatrix
vcMatrixExpressionProperty.CalculatedValue
vcMatrixListProperty.Value
vcMatrixProperty.Value
vcMatrixSignal.Value
vcMatrixStepProperty.AllowedValues
vcMatrixStepProperty.DefaultValue
vcMatrixStepProperty.Value
vcMotionTarget.BaseMatrix
vcMotionTarget.Target
vcMotionTarget.ToolMatrix
vcMotionTarget.getPositionerRootToPositionerFlange()
vcMotionTarget.getRobotRootToRobotFlange()
vcMotionTarget.getRootNodeToPositionerRoot()
vcMotionTarget.getRootNodeToRobotRoot()
vcMotionTarget.getSimWorldToRobotTool()
vcMotionTarget.getSimWorldToRobotWorld()
vcMotionTarget.getSimWorldToRootNode()
vcNode.InverseWorldPositionMatrix
vcNode.PositionMatrix
vcNode.WorldPositionMatrix
vcNode.localToWorld()
vcNode.worldToLocal()
vcPickedTopologyCurveInfo.CurvePositions
vcPositionFrame.Position
vcPositionFrame.PositionInReference
vcPositionFrame.PositionInWorld
vcProduct.WorldPositionMatrix
vcPtpTarget.Target
vcRaycastResult.Position
vcRobotController.WorldTransformMatrix
vcSetBaseStatement.Position
vcSetToolStatement.Position
vcSnapService.TargetMatrix
vcText3DSet.Matrix
vcToolFrame.CenterOfGravity
vcTopology.getCurvePosition()
vcTopology.getCurvePositions()
vcTopology.getFacePlaneIntersections()
vcTransportNode.VisualPosition
vcTransportPatternInStatement.Offset
vcTransportTarget.ProductPosition
vcTransportTarget.ProductPositionInNode
vcTransportTarget.ResourcePosition
vcTransportTarget.ResourcePositionInNode
vcView.CameraMatrix
vcVolumeDetector.Transformation
Properties
Learn how to use properties here. The properties are also inherited from the parent class.
| Name | Type | Access | Description |
| A | vcVector | RW | Gets or sets Approach vector that is unit vector in Z-axis direction. |
| Aw | Real | RW | Gets or sets w-component of the Approach vector. |
| Ax | Real | RW | Gets or sets x-component of the Approach vector. |
| AxisAngle | vcVector | RW | Gets or sets the orientation of the matrix as a rotation of its identity matrix about the axis defined by the XYZ values of the returned vector. The W property of the returned vector is the rotation angle (in degrees). |
| Ay | Real | RW | Gets or sets y-component of the Approach vector. |
| Az | Real | RW | Gets or sets z-component of the Approach vector. |
| Euler | vcVector | RW | Gets or sets the orientation of the matrix as a set of absolute rotations (in fixed coordinate system) around the Z-axis,See morefollowed by the Y-axis, and then again the Z-axis, in the form of a vector containing those angles (in degrees). |
| N | vcVector | RW | Gets or sets Normal vector that is unit vector in X-axis direction. |
| Nw | Real | RW | Gets or sets w-component of the Normal vector. |
| Nx | Real | RW | Gets or sets x-component of the Normal vector. |
| Ny | Real | RW | Gets or sets y-component of the Normal vector. |
| Nz | Real | RW | Gets or sets z-component of the Normal vector. |
| O | vcVector | RW | Gets or sets Orientation vector that is unit vector in Y-axis direction. |
| Ow | Real | RW | Gets or sets w-component of the Orientation vector. |
| Ox | Real | RW | Gets or sets x-component of the Orientation vector. |
| Oy | Real | RW | Gets or sets y-component of the Orientation vector. |
| Oz | Real | RW | Gets or sets z-component of the Orientation vector. |
| P | vcVector | RW | Gets or sets Position vector. |
| Pw | Real | RW | Gets or sets w-component of the Position vector. |
| Px | Real | RW | Gets or sets x-component of the Position vector. |
| Py | Real | RW | Gets or sets y-component of the Position vector. |
| Pz | Real | RW | Gets or sets z-component of the Position vector. |
| Quaternion | vcVector | RW | Gets or sets the orientation of the matrix as a quaternion in the form of a vector. |
| Values | list[Real] | R | Gets vcMatrix values as a list of 16 Reals. |
| WPR | vcVector | RW | Gets or sets roll, pitch and yaw angles. |
Methods
Learn how to use methods here. The methods are also inherited from the parent class.
| Name | Return Type | Parameters | Description |
| identity | None | None | Sets matrix to equal its identity. |
| invert | None | None | Sets the matrix to equal its inverse. |
| new | vcMatrix | None | Creates a new identity matrix. Returns: vcMatrix: Created vcMatrix. |
| new | vcMatrix | vcMatrix other | Creates a copy of the given vcMatrix.See moreParameters: copy (vcMatrix): The vcMatrix to create copy from. Returns: vcMatrix: Created vcMatrix. |
| new | vcMatrix | vcVector N, vcVector O, vcVector A, vcVector P | Creates a new vcMatrix from 4 vectors.See moreParameters: N (vcVector): Normal vector (unit vector in X-axis direction). O (vcVector): Orientation vector (unit vector in Y-axis direction). A (vcVector): Approach vector (unit vector in Z-axis direction). P (vcVector): Position vector. Returns: vcMatrix: Created vcMatrix. |
| new | vcMatrix | Real Nx, Real Ny, Real Nz, Real Ox, Real Oy, Real Oz, Real Ax, Real Ay, Real Az, Real Px, Real Py, Real Pz | Creates a new vcMatrix object from 12 Real values. The bottom row (W-components) of the vcMatrix is defined as (0, 0, 0, 1). Parameters: Nx (Real): X-component of Normal vector. Ny (Real): Y-component of Normal vector. Nz (Real): Z-component of Normal vector. Ox (Real): X-component of Orientation vector. Oy (Real): Y-component of Orientation vector. Oz (Real): Z-component of Orientation vector. Ax (Real): X-component of Approach vector. Ay (Real): Y-component of Approach vector. Az (Real): Z-component of Approach vector. Px (Real): X-component of Position vector. Py (Real): Y-component of Position vector. Pz (Real): Z-component of Position vector. Returns: vcMatrix: Created vcMatrix. |
| new | vcMatrix | Real Nx, Real Ny, Real Nz, Real Nw, Real Ox, Real Oy, Real Oz, Real Ow, Real Ax, Real Ay, Real Az, Real Aw, Real Px, Real Py, Real Pz, Real Pw | Creates a new vcMatrix object from 16 Real values. Parameters: Nx (Real): X-component of Normal vector. Ny (Real): Y-component of Normal vector. Nz (Real): Z-component of Normal vector. Nw (Real): W-component of Normal vector. Ox (Real): X-component of Orientation vector. Oy (Real): Y-component of Orientation vector. Oz (Real): Z-component of Orientation vector. Ow (Real): W-component of Orientation vector. Ax (Real): X-component of Approach vector. Ay (Real): Y-component of Approach vector. Az (Real): Z-component of Approach vector. Aw (Real): W-component of Approach vector. Px (Real): X-component of Position vector. Py (Real): Y-component of Position vector. Pz (Real): Z-component of Position vector. Pw (Real): W-component of Position vector. Returns: vcMatrix: Created vcMatrix. |
| rotateAbsV | None | vcVector vector, Real angle | Rotates the matrix around given axis in absolute coordinate system.See moreParameters: vector (vcVector): Defines the axis of rotation. angle (Real): Defines the amount of rotation. |
| rotateAbsX | None | Real angle | Rotates the matrix around X-axis in absolute coordinate system. Parameters: angle (Real): Defines the amount of rotation. |
| rotateAbsY | None | Real angle | Rotates the matrix around Y-axis in absolute coordinate system. Parameters: angle (Real): Defines the amount of rotation. |
| rotateAbsZ | None | Real angle | Rotates the matrix around Z-axis in absolute coordinate system. Parameters: angle (Real): Defines the amount of rotation. |
| rotateRelV | None | vcVector vector, Real angle | Rotates the matrix around given axis in coordinate system relative to matrix position.See moreParameters: vector (vcVector): Defines the axis of rotation. angle (Real): Defines the amount of rotation. |
| rotateRelX | None | Real angle | Rotates the matrix around X-axis in coordinate system relative to matrix position. Parameters: angle (Real): Defines the amount of rotation. |
| rotateRelY | None | Real angle | Rotate the matrix around Y-axis in coordinate system relative to matrix position. Parameters: angle (Real): Defines the amount of rotation. |
| rotateRelZ | None | Real angle | Rotates the matrix around Z-axis in coordinate system relative to matrix position. Parameters: angle (Real): Defines the amount of rotation. |
| scaleAbs | None | Real x, Real y, Real z | Scales the matrix in relation to 3D world origin.See moreParameters: x (Real): Scaling factor in x-direction. y (Real): Scaling factor in y-direction. z (Real): Scaling factor in z-direction. |
| scaleRel | None | Real x, Real y, Real z | Scales the matrix in relation to matrix position.See moreParameters: x (Real): Scaling factor in x-direction. y (Real): Scaling factor in y-direction. z (Real): Scaling factor in z-direction. |
| setIJK | None | Real i, Real j, Real k | Sets the orientation of the matrix so that its Approach vector (Z-axis) is aligned with a vector defined by i, j and k arguments.See moreParameters: i (Real): i-component of the alignment vector. j (Real): j-component of the alignment vector. k (Real): k-component of the alignment vector. |
| toString | String | Optional Keyword[format = vcMatrixFormat], Optional Keyword[precision = Integer], Optional Keyword[includeZeros = Boolean] | Returns string representation of matrix.See moreParameters: format (vcMatrixFormat): The representation format. precision (Integer): Precision of real values. includeZeros (Boolean): Include zeros up to the defined precision limit. (P=45.000000 vs P=45). Returns: String: String representation of matrix. |
| translateAbs | None | Real x, Real y, Real z | Translates the matrix position by a given offset in reference (Parent) coordinate system. Parent can be for example the World or a Node. See moreParameters: x (Real): Offset in x-direction. y (Real): Offset in y-direction. z (Real): Offset in z-direction. |
| translateRel | None | Real x, Real y, Real z | Translates the matrix position by a given offset in Object coordinate system.See moreParameters: x (Real): Offset in x-direction. y (Real): Offset in y-direction. z (Real): Offset in z-direction. |
| uniform | None | None | Modifies the matrix to be orthogonal and contain no scaling. |
| zero | vcMatrix | None | Creates a new matrix with all values zeros. Returns: vcMatrix: Created vcMatrix. |
Example: Move Component Location
""" This example shows how to translate a component relatively to its current position. """ import vcCore as vc comp = vc.getComponent() mtx = comp.PositionMatrix mtx.translateRel(0,0,1000) comp.PositionMatrix = mtx print (mtx)
Example: Zero Component Location
""" This example shows how to set the location of a component to zero. """ import vcCore as vc comp = vc.getComponent() comp.WorldPositionMatrix = vcMatrix.new() print (comp.WorldPositionMatrix)
Example: Move Component with Vector
""" a snippet for moving a component using vcVector """ import vcCore as vc comp = vc.getComponent() app = vc.getApplication() vec = vc.vcVector.new(200, 400, 600) mtx = comp.PositionMatrix mtx.P = vec comp.PositionMatrix = mtx app.render()